using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication1.Controllers
{
    public class test1Controller : Controller
    {
        public ActionResult t1()
        {
            HttpContext.Response.Write("1111");

            return View();
        }

        public ActionResult t2()
        {
            common.SqlServerHelper.strConnString = "Data Source=CUST-WEBREAD;Initial Catalog=scm;User ID=webreadtestuser;Password=webreadtestuser@123";
            System.Data.DataTable dt = common.SqlServerHelper.GetDataTable("select top 10 * from Clothes");
            ViewData["dt"] = dt;
            return View();
        }

        public ActionResult t3()
        {
            return Content("1111");
        }

        public ActionResult t4()
        {
            List<student> l = new List<student>();
            l.Add(new student() { no = "1", name = "zz" });
            return Json(l, JsonRequestBehavior.AllowGet);
        }

        private class student
        {
            public string no;
            public string name;
        }

        public ActionResult Details()
        {
            return PartialView("t3");
        }

        public ActionResult t5()
        {
            return View();
        }

        public ActionResult t6()
        {
            return View();
        }
    }
}